{template 'common/header'}
<div id="louie-setting" class="row" data-url="{php echo $this->createWebUrl('api')}">
    <div id="louie-header">
        <h6>基础设置</h6>
    </div>

    <ul class="nav nav-tabs">
        <li v-for="(item,index) in nav" v-bind:class="{'active':item.active}" v-on:click="changeNav(index)"><a href="javascript:;">{{item.name}}</a></li>
    </ul>

    <!--S公众号设置-->
    <form v-if="nav[navIndex].mark == 'wx'" action="" method="post" class="row col-xs-6" v-on:submit.prevent="submit">
        <div class="form-group">
            <label>appid</label>
            <input type="text" name="appid" v-model.trim="appid" class="form-control" placeholder="公众号appId" />
        </div>
        <div class="form-group">
            <label>appSecret</label>
            <input type="text" name="app_secret" v-model.trim="app_secret" class="form-control" placeholder="公众号appSecret" />
        </div>
        <div class="form-group">
            <label>商户号</label>
            <input type="text" name="mcht_account" v-model.trim="mcht_account" class="form-control" placeholder="微信支付商户号">
        </div>
        <div class="form-group">
            <label>商户密钥</label>
            <input type="text" name="mcht_key" v-model.trim="mcht_key" class="form-control" placeholder="微信支付商户密钥">
        </div>
        <div class="form-group">
            <label>商户证书</label>
            <input type="file" multiple="multiple" @change="uploadPem" />
            <p class="help-block">请上传apiclient_cert.pem和apiclient_key.pem证书(可多选)</p>
        </div>
        <button class="btn btn-primary" type="submit">确认设置</button>
    </form>
    <!--E公众号设置-->

    <!--S地图设置-->
    <form v-if="nav[navIndex].mark == 'map'" action="" method="post" class="row col-xs-6" v-on:submit.prevent="submit">
        <div class="form-group">
            <label>高德地图API</label>
            <input type="text" name="map_key" v-model.trim="map_key" class="form-control" placeholder="高德地图API" />
        </div>
        <button class="btn btn-primary" type="submit">确认设置</button>
    </form>
    <!--E地图设置-->

    <!--S财务设置-->
    <form v-if="nav[navIndex].mark == 'finance'" action="" method="post" class="row col-xs-6" v-on:submit.prevent="submit">
        <div class="form-group">
            <label>最低提现金额(用户余额满多少可提现,默认1元)</label>
            <input type="text" name="deposit_limit" v-model.trim="deposit_limit" class="form-control" placeholder="最低提现金额(用户余额满多少可提现,默认1元)" />
        </div>

        <div class="form-group">
            <label>提现金额大于多少需审核(默认0.00，全部提现申请都需要审核)</label>
            <input type="text" name="deposit_check" v-model.trim="deposit_check" class="form-control" placeholder="提现金额大于多少需审核(默认0，全部提现申请都需要审核)" />
        </div>

        <div class="form-group">
            <label>提现入账详情自定义内容</label>
            <input type="text" name="deposit_enter_detail" v-model.trim="deposit_enter_detail" class="form-control" placeholder="提现入账详情自定义内容" />
        </div>

        <button class="btn btn-primary" type="submit">确认设置</button>
    </form>
    <!--E财务设置-->

    <!--S其它设置-->
    <form v-if="nav[navIndex].mark == 'other'" action="" method="post" class="row col-xs-6" v-on:submit.prevent="submit">
        <div class="form-group">
            <label>是否开启域名防封(开启域名防封必须安装模块：酷源防封)</label>
            <div class="radio">
                <label><input type="radio" name="domain_defend" v-model="domain_defend" value="0" @change="defendChange" />关闭</label>
                <label><input type="radio" name="domain_defend" v-model="domain_defend" value="1" @change="defendChange" />开启</label>
            </div>
        </div>
        <button class="btn btn-primary" type="submit">确认设置</button>
    </form>
    <!--E其它设置-->

    <!--S提示框-->
    <v-dialog style="z-index:9999999;"/>
    <!--E提示框-->

</div>
<script src="../addons/kuyuan_vbz/dist/web/setting.js"></script>
{template 'common/footer'}